package com.codejie.pms.service.impl;

import com.codejie.pms.entity.Check_staff;
import com.codejie.pms.entity.Project;
import com.codejie.pms.entity.Staff;
import com.codejie.pms.entity.StaffKpi;
import com.codejie.pms.mapper.ModelManagerMapper;
import com.codejie.pms.service.ModelManagerService;
import com.github.pagehelper.PageHelper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ModelManagerServiceImpl implements ModelManagerService {
    @Resource
    private ModelManagerMapper modelManagerMapper;

    //查询所有项目信息
    @Override
    public List<Project> projectList() {
        return modelManagerMapper.projectList();
    }

    @Override
    public List<Project> selectProjectList(Project project, int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        return modelManagerMapper.projectList();
    }

    @Override
    public void addProject(Project project) {
        modelManagerMapper.addProject(project);
    }

    @Override
    public Project selectByproId(String id) {

        return modelManagerMapper.selectByproId(id);
    }

    @Override
    public void deleteByproId(String id) {
        modelManagerMapper.deleteByproId(id);
    }

    @Override
    public void updateByproId(Project project) {
        modelManagerMapper.updateByproId(project);
    }

    @Override
    public List<Staff> staffByModel() {
        return modelManagerMapper.staffByModel();
    }

    @Override
    public List<Check_staff> check_staffByModel() {
        return modelManagerMapper.check_staffByModel();
    }

    @Override
    public void updateAdvice(StaffKpi staffKpi) {
        modelManagerMapper.updateAdvice(staffKpi);

    }

    @Override
    public StaffKpi adviceby(String id) {
        return modelManagerMapper.adviceby(id);
    }

    @Override
    public List<StaffKpi> checkstaff() {
        return modelManagerMapper.checkstaff();
    }


}
